package com.feng.controller;

import com.feng.entity.ChatRoom;
import com.feng.entity.RestResponse;
import com.feng.service.ChatRoomService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/chatRoom")
public class ChatRoomController {

    private final ChatRoomService chatRoomService;

    public ChatRoomController(ChatRoomService chatRoomService) {
        this.chatRoomService = chatRoomService;
    }

    @GetMapping("/getChatRoom")
    public RestResponse getChatRoom(Integer pageNum, Integer pageSize){
        return chatRoomService.getChatRoom(pageNum,pageSize);
    }
}
